#pragma once

#include <iostream>
#include <memory>
#include <vector>

class Product {
private:
  std::vector<std::string> parts_{};
public:
  Product() = default;
  ~Product() = default;
  void addPart(std::string part);
  void display();
};

using ProductPtr = std::shared_ptr<Product>;

void Product::addPart(std::string part) {
  parts_.emplace_back(part);
}

void Product::display() {
  for (auto& part : parts_) {
    std::cout << part << ", ";
  }
  std::cout << std::endl;
}
